﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CBE.Model;
using Common.UI.EM;
using CBE.UI.Control.Views;
using CBE.Services;
using CBE.UI.Control.Presenters;

namespace CBE.UI.Control
{
    public class AdministrarServiciosController : GenericEntityController<AdministrarServiciosServiceLogic, Servicios, AdministrarServiciosCriteria, AdministrarServiciosView>
    {
        public override string Title
        {
            get
            {
                return "Administrar servicios";
            }
        }

        protected override Common.UI.EM.Views.DetailDataView CreateDetailDataView()
        {
            return new AdministrarServiciosDetailDataView();
        }

        protected override Common.UI.EM.Views.FilterDataView CreateFilterDataView()
        {
            return new AdministrarServiciosFilterDataView();
        }

        protected override void CreateEntityPresentationModel()
        {
            this.EntityPresentationModel = new AdministrarServiciosEntityPresentationModel(this.CreateFilterView(), this.CreateListView(), this.CreateDetailView());
        }

        protected override void AddColumnDefinitions()
        {
            this.EntityPresentationModel.AddColumnDefinition(AdministrarServiciosView.CodigoPropertyName, "Código");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarServiciosView.DescripcionPropertyName, "Descripción");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarServiciosView.DuracionPropertyName, "Duración");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarServiciosView.PrecioPropertyName, "Precio");
        }
    }
}
